﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Trade.Controls;
using Trade.DAL;
using Trade.Model;

namespace Trade
{
    public partial class FrmSalesSearchCondition : Trade.Controls.RayForm
    {
        FrmSalesMain salesMainForm = null;

        public FrmSalesSearchCondition()
        {
            InitializeComponent();
        }

        private void FrmPurchaseSearchCondition_Load(object sender, EventArgs e)
        {
            salesMainForm = (FrmSalesMain)this.Owner;
        }

        private void btnApply_Click(object sender, EventArgs e)
        {
            salesMainForm.condSalesNo = txtSalesNo.Text.Trim();
            salesMainForm.condShipFormNo = txtShipFormNo.Text.Trim();
            salesMainForm.condCustomer = txtCustomer.Text.Trim();
            salesMainForm.condWarehouse = txtWarehouse.Text.Trim();
            salesMainForm.condEmployee = txtEmployee.Text.Trim();
            salesMainForm.condEntryDate = Convert.ToDateTime(txtEntryDate.Text.Trim());
            salesMainForm.condApply = true;
            this.Close();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
